#include "qsmoothdialog.h"
#include "ui_qsmoothdialog.h"
#include <QDebug>
#include "oglwidget.h"

QSmoothDialog::QSmoothDialog(QString str, QWidget *parent) :
    QDialog(parent),
    ui(new Ui::QSmoothDialog)
{
    ui->setupUi(this);
    if(str.isEmpty()){
        this->setWindowTitle("Smooth");
    }
    else{
        this->setWindowTitle(str);
    }
}

QSmoothDialog::~QSmoothDialog()
{
    delete ui;
}

void QSmoothDialog::on_btnApply_clicked()
{
    lambda = ui->lambda->text().toFloat();
    mu = ui->mu->text().toFloat();
    steps = ui->steps->text().toInt();
    emit Smooth();
}

void QSmoothDialog::on_btnCancel_clicked()
{
    this->hide();
}
